package org.wuliu.pojo;

import java.sql.Timestamp;

public class User {
    private Integer id;
    private String userCode;
    private String name;
    private String password;
    private String scal;
    private Integer cjId;
    private Timestamp cjDate;
    private Integer xgId;
    private Timestamp xgDate;
    private Integer danweiId;
    private Integer zhuangtai;
    private String beizhu;
    private Gongsi gongsi;
    private User chuangjian;
    private User xiugai;
    private Role role;

    public Integer getDanweiId() {
        return danweiId;
    }

    public void setDanweiId(Integer danweiId) {
        this.danweiId = danweiId;
    }

    public Role getRole() {
        return role;
    }

    public void setRole(Role role) {
        this.role = role;
    }

    public User getChuangjian() {
        return chuangjian;
    }

    public void setChuangjian(User chuangjian) {
        this.chuangjian = chuangjian;
    }

    public User getXiugai() {
        return xiugai;
    }

    public void setXiugai(User xiugai) {
        this.xiugai = xiugai;
    }

    public Gongsi getGongsi() {
        return gongsi;
    }

    public void setGongsi(Gongsi gongsi) {
        this.gongsi = gongsi;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUserCode() {
        return userCode;
    }

    public void setUserCode(String userCode) {
        this.userCode = userCode;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getScal() {
        return scal;
    }

    public void setScal(String scal) {
        this.scal = scal;
    }

    public Integer getCjId() {
        return cjId;
    }

    public void setCjId(Integer cjId) {
        this.cjId = cjId;
    }

    public Timestamp getCjDate() {
        return cjDate;
    }

    public void setCjDate(Timestamp cjDate) {
        this.cjDate = cjDate;
    }

    public Integer getXgId() {
        return xgId;
    }

    public void setXgId(Integer xgId) {
        this.xgId = xgId;
    }

    public Timestamp getXgDate() {
        return xgDate;
    }

    public void setXgDate(Timestamp xgDate) {
        this.xgDate = xgDate;
    }

    public Integer getGongsiId() {
        return danweiId;
    }

    public void setGongsiId(Integer danweiId) {
        this.danweiId = danweiId;
    }

    public Integer getZhuangtai() {
        return zhuangtai;
    }

    public void setZhuangtai(Integer zhuangtai) {
        this.zhuangtai = zhuangtai;
    }

    public String getBeizhu() {
        return beizhu;
    }

    public void setBeizhu(String beizhu) {
        this.beizhu = beizhu;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        User user = (User) o;

        if (id != null ? !id.equals(user.id) : user.id != null) return false;
        if (userCode != null ? !userCode.equals(user.userCode) : user.userCode != null) return false;
        if (name != null ? !name.equals(user.name) : user.name != null) return false;
        if (password != null ? !password.equals(user.password) : user.password != null) return false;
        if (scal != null ? !scal.equals(user.scal) : user.scal != null) return false;
        if (cjId != null ? !cjId.equals(user.cjId) : user.cjId != null) return false;
        if (cjDate != null ? !cjDate.equals(user.cjDate) : user.cjDate != null) return false;
        if (xgId != null ? !xgId.equals(user.xgId) : user.xgId != null) return false;
        if (xgDate != null ? !xgDate.equals(user.xgDate) : user.xgDate != null) return false;
        if (danweiId != null ? !danweiId.equals(user.danweiId) : user.danweiId != null) return false;
        if (zhuangtai != null ? !zhuangtai.equals(user.zhuangtai) : user.zhuangtai != null) return false;
        if (beizhu != null ? !beizhu.equals(user.beizhu) : user.beizhu != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (userCode != null ? userCode.hashCode() : 0);
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (password != null ? password.hashCode() : 0);
        result = 31 * result + (scal != null ? scal.hashCode() : 0);
        result = 31 * result + (cjId != null ? cjId.hashCode() : 0);
        result = 31 * result + (cjDate != null ? cjDate.hashCode() : 0);
        result = 31 * result + (xgId != null ? xgId.hashCode() : 0);
        result = 31 * result + (xgDate != null ? xgDate.hashCode() : 0);
        result = 31 * result + (danweiId != null ? danweiId.hashCode() : 0);
        result = 31 * result + (zhuangtai != null ? zhuangtai.hashCode() : 0);
        result = 31 * result + (beizhu != null ? beizhu.hashCode() : 0);
        return result;
    }
    public String toString(){
        String str="";
        str+="id:"+this.getId()+",scal:"+this.getScal()+",beizhu:"+this.getBeizhu()+",zhuangtai:"+this.getZhuangtai()+",pwd:"+this.getPassword()+
                ",name:"+this.getName()+",userCode:"+this.getUserCode()+",cjid:"+this.getCjId()+",xgid:"+this.getXgId()+",gongsi:"+this.getGongsiId();
        return str;
    }
}
